package com.xjj.service.enumeration;

/**
 * @Description 发送范围枚举类
 * @Author zhangjin
 * @Date 2022/10/24 17:41
 */
public enum PublishRange {
    PUB_ALL("1", "全校"),
    PUB_ALLCLASS("2", "全部班级"),
    PUB_TEACHER("3", "全体教师"),
    PUB_ONECLASS("4", "指定班级");
    private String key;
    private String value;

    PublishRange(String key, String value) {
        this.key=key;
        this.value=value;
    }

    public String getId() {
        return this.key;
    }
    public String getValue() {
        return this.value;
    }

    public static String getValue(String code){
        PublishRange[] imageFormatTypes = values();
        for (PublishRange imageFormatType : imageFormatTypes) {
            if (imageFormatType.getId().equals(code)) {
                return imageFormatType.getValue();
            }
        }
        return null;
    }
}
